#include "interface/decoder_plugin.h"

namespace OHOS {
namespace Media {
namespace Plugin {

class Minimp3Decoder : public PluginBaseImpl, DecoderPlugin {
public:
    Status QueueInputBuffer(const std::shard_ptr<Buffer> &inputBuffers, int32_t timeoutMs);
    Status QueueOutputBuffer(const std::shard_ptr<Buffer> &outputBuffers, int32_t timeoutMs);
    Status Flush();
    Status SetDataCallback(const std::weak_ptr<DataCallback &dataCallback>);

private:
    std::weak_ptr<DataCallback> dataCb_{};
        
    // outBufferQ有自己的锁保护 不要和lock_同时混用 否则可能导致死锁
    OHOS::Media::BlockingQueue<std::shared_ptr<Buffer>> outBufferQ_;
};


}
}
}